-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reverted the "kind" field to the previous value. #3668
Conversation
Added a new field named "crate_types".
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
I believe previously |
@alexcrichton, |
I will fix it. |
@KalitaAlexey yes, it was changed. If you make a small example library with two crate-types, metadata prints this "kind" : [
"rlib",
"dylib"
] |
@alexcrichton, |
@alexcrichton,
I got:
|
}, | ||
{ | ||
"kind": [ "example" ], | ||
"crate_types": [ "rlib", "dylib" ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexcrichton,
The test checks what you asked.
As I mentioned before, we'll need to preserve the existing stable semantics of |
@alexcrichton, |
Currently this PR will emit at most one entry in the array of the
That prints:
|
@bors: r+ Thanks! |
📌 Commit 582bc55 has been approved by |
Reverted the "kind" field to the previous value. Added a new field named "crate_types". Fixes #3654 After this PR `cargo metadata` would output: ```json { "packages": [ { "targets": [ { "kind": ["lib"], "crate_types": ["lib"] }, { "kind": ["example"], "crate_types": ["staticlib"] } ] } ] } ``` I have added tests.
☀️ Test successful - status-appveyor, status-travis |
I'm curious, will this get merged to the beta channel/rustc-1.16? I'm not familiar with how rust/cargo releases and branches are handled. |
@ehuss oh is this bug on beta? I thought it was only on nightly? |
The original commit that added support for examples as libraries (#3556) was added to master around Jan 20. I think the rust-1.16.0 branch was made around Feb 1. This fix was committed to master on Feb 11, after the rust-1.16.0 branch was made. I assume beta is being pulled from the rust-1.16.0 branch. |
@ehuss ah yes I'll backport, thanks for the ping! |
@alexcrichton, |
Yes |
This is not actually in the 1.16 release as the backport occured after the build. |
Added a new field named "crate_types".
Fixes #3654
After this PR
cargo metadata
would output:I have added tests.